package com.zklt.snmp.demo;

import com.zklt.snmp.demo.receiver.SnmpReceiver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import javax.annotation.Resource;


@SpringBootApplication
public class SnmpDemoApplication {

    @Resource
    private SnmpReceiver snmpReceiver;

    /**
     * 项目启动时，启动监听
     */
    @Bean
    public void runSnmpListener() {
        snmpReceiver.run();
    }

    public static void main(String[] args) {
        SpringApplication.run(SnmpDemoApplication.class, args);
    }

}
